import sympy

x = sympy.Symbol('x')
alpha = 2
beta = 3
f = x
g = x ** 2
a = 0
b = 1

integral_alpha_f = alpha * sympy.integrate(f, (x, a, b))
integral_beta_g = beta * sympy.integrate(g, (x, a, b))
integral_alpha_f_plus_beta_g = sympy.integrate(alpha * f + beta * g, (x, a, b))

print("∫ from {} to {} of {} dx = {}".format(a, b, alpha * f, integral_alpha_f))
print("∫ from {} to {} of {} dx = {}".format(a, b, beta * g, integral_beta_g))
print("∫ from {} to {} of {} dx = {}".format(a, b, alpha * f + beta * g, integral_alpha_f_plus_beta_g))